package com.smedi.ismedi.inmail.core.application.query.vo;

import lombok.*;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @auther Cookie
 * @date 2022/8/25
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class SafetyEducationProjectStatisticsVo {
    /**
     * 名称
     */
    private String name;

    /**
     * 起始时间
     */
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    private LocalDateTime endTime;

    /**
     * 每日晨会教育数
     */
    private BigDecimal dailyMorningNumber;

    /**
     * 节前教育数
     */
    private BigDecimal preFestivalNumber;

    /**
     * 专项培训数
     */
    private BigDecimal specialTrainingNumber;

    public String getName() {
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("MM.dd");
        return this.startTime.format(dateTimeFormatter) + "-" + this.endTime.minusDays(1L).format(dateTimeFormatter);
    }
}
